<template>
  <div class="page-miH page-bgBack">
    <PageHeader @back="$router.go(-1)" subTitle="返回">
      成员客户明细
    </PageHeader>
    <div class="name">
      {{ $route.query.name }} <a-icon type="user" />
      <span v-if="$route.query.jurisdiction == '1'">客户经理</span>
      <span v-if="$route.query.jurisdiction == '2'">客户专员</span>
    </div>
    <div class="box">
      <a-tabs type="card" default-active-key="potential" @change="v => (componentName = v)">
        <a-tab-pane :key="item.type" v-for="item in numArr">
          <span slot="tab">
            <a-badge :count="item.num" :offset="[5, -2]">{{ item.name }}</a-badge>
          </span>
        </a-tab-pane>
      </a-tabs>
      <div :is="componentName"></div>
    </div>
  </div>
</template>

<script>
import potential from "./potential";
import signing from "./signing";
export default {
  components: {
    potential,
    signing
  },
  data() {
    return {
      componentName: "potential",
      numArr: [
        { type: "potential", name: "潜在客户", num: 0 },
        { type: "signing", name: "签约客户", num: 0 }
      ]
    };
  }
};
</script>

<style lang="scss" scoped>
.box {
  padding: 24px;
  ::v-deep.ant-tabs-tab {
    line-height: 60px;
    padding-top: 0px;
    height: 60px;
    margin-right: 12px !important;
  }
  ::v-deep.ant-tabs-bar {
    margin-bottom: 24px !important;
  }
}
.name {
  font-size: 18px;
  color: #3c3d43;
  font-weight: 500;
  margin: 24px 0 0 24px;
  span {
    font-size: 12px;
    font-weight: 400;
    color: #767885;
  }
  i {
    font-size: 12px;
    color: #767885;
    margin-left: 14px;
  }
}
</style>
